# -*- coding: utf-8 -*-
"""
https://www.jianshu.com/p/420addb28dae

@author: Administrator
"""

import hashlib

# ######## md5 ########

string = "beyongjie"


md5 = hashlib.md5()
md5.update(string.encode('utf-8'))     #注意转码
res = md5.hexdigest()

i=1
while res[0]!="0":
    i=i+1
    md5.update(str(i))     
    res = md5.hexdigest()
    print(res)
    
print("md5加密结果:",res)
